[Unit]
Description=Slurm REST daemon
After=network-online.target munge.service slurmctld.service
Wants=network-online.target
ConditionPathExists=/etc/slurm/slurm.conf

[Service]
Type=simple
EnvironmentFile=-/etc/sysconfig/slurmrestd
User={{ slurmrest_username }}
Group={{ slurmrest_groupname }}
# Default to local auth via socket
#ExecStart=/usr/sbin/slurmrestd $SLURMRESTD_OPTIONS unix:/var/lib/slurmrestd.socket
# Uncomment to enable listening mode
ExecStart=/usr/sbin/slurmrestd $SLURMRESTD_OPTIONS 0.0.0.0:6820
Environment="SLURM_JWT=invalid"
ExecReload=/bin/kill -HUP $MAINPID

[Install]
WantedBy=multi-user.target
